gdkframeclock: Loop the layout phase if needed
authorAlexander Larsson <alexl@redhat.com>
Wed, 24 Apr 2013 20:21:06 +0000 (22:21 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 7 May 2013 14:33:01 +0000 (16:33 +0200)
commitc3bff30b504f80f9c8bc451bb5a73d1b0047b89f
tree105f97e8346d2e308c7fca5dddd40e0b6797a9c4
parente0ca53ff7c797bde8ba926aa9a4b47855208ba1e
gdkframeclock: Loop the layout phase if needed

In the case where the layout phase queued a layout we don't
want to progress to the paint phase with invalid allocations, so
we loop the layout. This shouldn't normally happen, but it may
happen in some edge cases like if user/wm resizes clash with
natural window size changes from a gtk widget. This should not
generally loop though, so we detect this after 4 cycles and
print a warning.

This was detected because of an issue in GtkWindow where it
seems to incorrectly handle the case of a user interactive resize.
It seems gtk_window_move_resize() believes that configure_request_size_changed
changed due to hitting some corner case so it calls
gtk_widget_queue_resize_no_redraw(), marking the window as need_alloc
after the layout phase. This commit fixes the issue, but we should
also look into if we can fix that.
gdk/gdkframeclockidle.c